﻿<link href="@Url.Content("~/content/activitie_detail.css")" rel="stylesheet" type="text/css"/>
<link href="@Url.Content("~/content/table_btn.css")" rel="stylesheet" type="text/css"/>
<link rel="stylesheet" href="@Url.Content("~/plugin/css/pikaday.css")">
<link rel="stylesheet" href="@Url.Content("~/plugin/css/site.css")">
<script src="@Url.Content("~/plugin/moment.min.js")"></script>
<script src="@Url.Content("~/plugin/pikaday.js")"></script>

<!--[if lt IE 8]>
    <link href="@Url.Content("~/content/activitie_create.css")" rel="stylesheet" type="text/css"/>
<![endif]-->

<noscript>
    <link href="@Url.Content("~/content/activitie_create.css")" rel="stylesheet" type="text/css"/>
    <link href="@Url.Content("~/content/activitie_noscript.css")" rel="stylesheet" type="text/css"/>
</noscript>

@model PessModel.Archive

@{
    ViewBag.Title = "Edit";
}
<script src="@Url.Content("~/Scripts/jquery-1.9.1.min.js")" type="text/javascript"></script>

<h2>编辑档案列表</h2>
<div id="operate" class="formUp">
   @*<div>@Html.ActionLink("返回", "Index", new {activityID=Model.Subject.ActivityID },null)</div>*@
    <div>@Html.ActionLink("返回", "Details", new {id=Model.ID },null)</div>
    @using (Html.BeginForm("UploadPhoto", "Archive", FormMethod.Post, new { enctype = "multipart/form-data" }))
    {
        <input type="submit" value="上传" />
        <input type="file" name="file" class="fileNew imgUP" id="fileNew" onchange="document.getElementById('textNew').value=this.value" />
        <input type="button" class="btnNew" value="浏览..." /> 
        <input type="text" name="textNew" id="textNew" class="textNew" readonly="true" /> 
        <span>照片： </span>
        @Html.Hidden("ArchiveID",Model.ID)

    }
</div>


@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)

    <fieldset class="edit">

        @Html.HiddenFor(model => model.ID)
        @Html.HiddenFor(model => model.SerialNumber)
        @Html.HiddenFor(model=>model.CountyCode)
        <div class="editor-label">
            @*@Html.LabelFor(model => model.SerialNumber)*@编号：
        </div>
        <div class="editor-field down">
            @Html.DisplayFor(model => model.SerialNumber)
        </div>

        <div class="editor-label">
            @*@Html.LabelFor(model => model.ProjectTitle)*@
            @PessResources.Archive.ProjectTitle：
        </div>
        <div class="editor-field long">
            @Html.EditorFor(model => model.ProjectTitle)
            @Html.ValidationMessageFor(model => model.CountyCode)
        </div>
        @if(Roles.IsUserInRole(Membership.GetUser().UserName,"Admin"))
        {
        <div class ="editor-label">
            评委组:
        </div>
        <div class="editor-field">
            @Html.DropDownList("ExpertGroupID")
            @Html.ValidationMessageFor(model => model.ExpertGroupID)
        </div>
        }
      
        <div class="editor-label">
            @*@Html.LabelFor(model => model.SubjectID, "Subject")*@
            @PessResources.Archive.SubjectName：
        </div>
        <div class="editor-field">
            @Html.DropDownList("SubjectID", String.Empty)
            @Html.ValidationMessageFor(model => model.SubjectID)
        </div>
        <div class="inline">
        <div class="editor-label">
            @*@Html.LabelFor(model => model.CountyCode)*@区县：
        </div>
        <div class="editor-field short">
            @Html.DisplayFor(model => model.County.Name)
            @Html.ValidationMessageFor(model => model.CountyCode)
        </div>
      </div>

       <div class="inline">
       <div class="editor-label">
            @*@Html.LabelFor(model => model.TeacherName)*@
           @PessResources.Archive.TeacherName：
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.TeacherName)
            @Html.ValidationMessageFor(model => model.TeacherName)
        </div>
        <div class="editor-label">
            @*@Html.LabelFor(model => model.Birthdate)*@出生日期：
        </div>
        <div class="editor-field">
            <input type="text" id="BirthDate" name="BirthDate" value="@Html.DisplayFor(model => model.Birthdate)">
            @*@Html.EditorFor(model => model.Birthdate)*@
            @Html.ValidationMessageFor(model => model.Birthdate)
        </div>
        </div>

      <div class="inline">
       <div class="editor-label">
            @*@Html.LabelFor(model => model.Gender)*@性别：
        </div>
        <div class="editor-field short">
            @*@Html.EditorFor(model => model.Gender)*@
            @Html.DropDownList("Gender")
            @Html.ValidationMessageFor(model => model.Gender)
        </div>
        <div class="editor-label">
            @*@Html.LabelFor(model => model.PhoneNumber)*@电话：
        </div>
        <div class="editor-field short">
            @Html.EditorFor(model => model.PhoneNumber)
            @Html.ValidationMessageFor(model => model.PhoneNumber)
        </div>
        </div>

      <div class="inline">
        <div class="editor-label">
            @*@Html.LabelFor(model => model.GradeLevel)*@任教年级：
        </div>
        <div class="editor-field short">
            @Html.EditorFor(model => model.GradeLevel)
            @Html.ValidationMessageFor(model => model.GradeLevel)
        </div>


        <div class="editor-label">
            @*@Html.LabelFor(model => model.EducationDegree)*@学历：
        </div>
        <div class="editor-field short">
            @Html.EditorFor(model => model.EducationDegree)
            @Html.ValidationMessageFor(model => model.EducationDegree)
        </div>
        </div>

        <div class="editor-label">
            @*@Html.LabelFor(model => model.SchoolName)*@
            @PessResources.Archive.SchoolName：
        </div>
        <div class="editor-field long">
            @Html.EditorFor(model => model.SchoolName)
            @Html.ValidationMessageFor(model => model.SchoolName)
        </div>

        <div class="editor-label">
            @*@Html.LabelFor(model => model.SchoolAddress)*@
            @PessResources.Archive.SchoolAddress：
        </div>
        <div class="editor-field long">
            @Html.EditorFor(model => model.SchoolAddress)
            @Html.ValidationMessageFor(model => model.SchoolAddress)
        </div>

        <div class="editor-label">
            @*@Html.LabelFor(model => model.SchoolPrincipal)*@职务：
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.SchoolPrincipal)
            @Html.ValidationMessageFor(model => model.SchoolPrincipal)
        </div>

        <div class="editor-label fly2">
            @*@Html.LabelFor(model => model.SchoolComment)*@学校评语：
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.SchoolComment)
            @Html.ValidationMessageFor(model => model.SchoolComment)
        </div>

        <div class="editor-label fly2">
            @*@Html.LabelFor(model => model.CountyEBComment)*@区县评语：
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.CountyEBComment)
            @Html.ValidationMessageFor(model => model.CountyEBComment)
        </div>

        <div class="editor-label">
            历史档案号：
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.PreviousSN)
            @Html.ValidationMessageFor(model => model.PreviousSN)
        </div>
        <div>@Html.PhotoImage(string.Format("~/uploads/{0}/{1}/",Model.Subject.ActivityID,Model.ID)+Model.PhotoUrl)</div>

        <div class="editor-btn">
            <input type="submit" value="保存" />
        </div>
    </fieldset>
}
<script>
        var pikaday1 = new Pikaday({
            field: document.getElementById('BirthDate'),
            firstDay: 1,
            minDate: new Date('1905-01-01'),
            maxDate: new Date('2025-12-31'),
            yearRange: [1905,2025],
            onSelect: function () { },
            onOpen: function () {
            }
        });
</script>

@*@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}*@
